package schoolmath.web.services.stacks;

import org.apache.tapestry5.Asset;
import org.apache.tapestry5.annotations.Path;
import org.apache.tapestry5.services.javascript.StylesheetLink;

import javax.inject.Inject;
import java.util.ArrayList;
import java.util.List;

public class BootstrapStackImpl implements BootstrapStack {

	@Inject
	@Path("context:/bootstrap/css/bootstrap.min.css")
	private Asset css;
	@Inject
	@Path("context:/bootstrap/css/bootstrap-theme.min.css")
	private Asset themeCss;
	@Inject
	@Path("context:/bootstrap/js/bootstrap.min.js")
	private Asset js;

	@Override
	public List<String> getStacks() {
		return new ArrayList<>();
	}

	@Override
	public List<Asset> getJavaScriptLibraries() {
		List<Asset> assets = new ArrayList<>();

		assets.add(js);

		return assets;
	}

	@Override
	public List<StylesheetLink> getStylesheets() {
		List<StylesheetLink> stylesheetLinks = new ArrayList<>();

		stylesheetLinks.add(new StylesheetLink(css));
		stylesheetLinks.add(new StylesheetLink(themeCss));

		return stylesheetLinks;
	}

	@Override
	public String getInitialization() {
		return null;
	}
}
